package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntArticuloVideo;
import emp.jsf.servicio.ArticuloVideoService;
import emp.repositorios.ArticuloVideoRepository;

@Service("articuloVideoService")
public class ArticuloVideoServiceImpl implements ArticuloVideoService{

	@Autowired
	ArticuloVideoRepository articuloVideoRepository;
	
	public List<EntArticuloVideo> listarArticuloVideos(){
		return articuloVideoRepository.findAll();
	}
	
	public EntArticuloVideo grabarArticuloVideo(EntArticuloVideo ent){
		return articuloVideoRepository.saveAndFlush(ent);
	}
	
	public void eliminar(EntArticuloVideo ent){
		articuloVideoRepository.delete(ent);
	}
}
